import { get, post } from '../utils/request.js';
import { GetApiUrl } from "@/utils/use-config";
const url = GetApiUrl('BasicsApi');
// eslint-disable-next-line import/no-anonymous-default-export

export default {
    // 登陆
    login: params => post(url + "Permission/Login", params),

    // 获取缓存工厂列表
    getFactoryList: params => get(url + "Permission/getLoginFactoryList", params),
    // 获取系统标题
    getSysTile: params => get(url + "Permission/getLoginSysTitle", params),
    // 获取国际化语言
    getLanguage: params => get(url + "Permission/getLoginLanguageTypeList", params),

    // 获取菜单版本号
    getMenuVersion: menuId => get(url + "SysMenuInfo/getMenuVersionNo", { menuId }),
    // 获取页面的全部配置信息，保存到indexDB中
    getMenuPageConfigInfo: menuId => get(url + "SysMenuInfo/getMenuPageConfigInfo", { menuId }),

    // 验证是否初次登陆或需要修改密码
    getPasswordFlag: params => get(url + "SysUserInfo/PasswordFlag", params),
    // 获取当前登陆人员工厂权限列表
    getListByLoginUser: params => get(url + "SysUserByFactory/GetListByLoginUser", params),
    // 获取当前登陆人员菜单权限
    getListByWebRoleMenuType: () => get(url + "SysMenuInfo/GetListByWebRoleMenuType", { menuType: "ProductDesign-V512" }),
}
